import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner distance = new Scanner(System.in);
        int x1 = distance.nextInt();
        int y1 = distance.nextInt();
        int x2 = distance.nextInt();
        int y2 = distance.nextInt();

        int num = (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2);
        System.out.println(num);
    }
}
